package com.xls.future.model;

import android.content.Context;
import android.provider.MediaStore;

import com.xls.future.entity.VideoInfo;

import java.util.List;

import cn.bmob.v3.BmobQuery;
import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by Administrator on 2017/10/17.
 */

public class FindModelImpl implements FindModel {

    @Override
    public void loadVideoInfos(Context context, Subscriber<List<VideoInfo>> subscriber) {
        BmobQuery<VideoInfo> query = new BmobQuery<>();
        query.findObjectsObservable(VideoInfo.class)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(subscriber);
    }
}
